package com.peng.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.peng.config.converter.*;
import lombok.Data;

/**
 * 线索表
 * @TableName t_clue
 */
@TableName(value ="t_clue")
@Data
public class TClue implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键，自动增长，线索ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 线索所属人ID
     */
    @ExcelProperty(value = "负责人")
    @TableField(value = "owner_id")
    private Integer owner_id;

    /**
     * 活动ID
     */
    @ExcelProperty(value = "所属活动")
    @TableField(value = "activity_id")
    private Integer activity_id;

    /**
     * 姓名
     */
    @ExcelProperty(value = "姓名")
    @TableField(value = "full_name")
    private String full_name;

    /**
     * 称呼
     */
    @ExcelProperty(value = "称呼", converter = AppellationConverter.class)
    @TableField(value = "appellation")
    private Integer appellation;

    /**
     * 手机号
     */
    @ExcelProperty(value = "手机号")
    @TableField(value = "phone")
    private String phone;

    /**
     * 微信号
     */
    @ExcelProperty(value = "微信号")
    @TableField(value = "weixin")
    private String weixin;

    /**
     * QQ号
     */
    @ExcelProperty(value = "QQ号")
    @TableField(value = "qq")
    private String qq;

    /**
     * 邮箱
     */
    @ExcelProperty(value = "邮箱")
    @TableField(value = "email")
    private String email;

    /**
     * 年龄
     */
    @ExcelProperty(value = "年龄")
    @TableField(value = "age")
    private Integer age;

    /**
     * 职业
     */
    @ExcelProperty(value = "职业")
    @TableField(value = "job")
    private String job;

    /**
     * 年收入
     */
    @ExcelProperty(value = "年收入")
    @TableField(value = "year_income")
    private BigDecimal year_income;

    /**
     * 地址
     */
    @ExcelProperty(value = "地址")
    @TableField(value = "address")
    private String address;

    /**
     * 是否需要贷款（0不需要，1需要）
     */
    @ExcelProperty(value = "是否贷款", converter = NeedLoanConverter.class)
    @TableField(value = "need_loan")
    private Integer need_loan;

    /**
     * 意向状态
     */
    @ExcelProperty(value = "意向状态", converter = IntentionStateConverter.class)
    @TableField(value = "intention_state")
    private Integer intention_state;

    /**
     * 意向产品
     */
    @ExcelProperty(value = "意向产品", converter = IntentionProductConverter.class)
    @TableField(value = "intention_product")
    private Integer intention_product;

    /**
     * 线索状态
     */
    @ExcelProperty(value = "线索状态", converter = StateConverter.class)
    @TableField(value = "state")
    private Integer state;

    /**
     * 线索来源
     */
    @ExcelProperty(value = "线索来源", converter = SourceConverter.class)
    @TableField(value = "source")
    private Integer source;

    /**
     * 线索描述
     */
    @TableField(value = "description")
    private String description;

    /**
     * 下次联系时间
     */
    @TableField(value = "next_contact_time")
    private Date next_contact_time;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date create_time;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private Integer create_by;

    /**
     * 编辑时间
     */
    @TableField(value = "edit_time")
    private Date edit_time;

    /**
     * 编辑人
     */
    @TableField(value = "edit_by")
    private Integer edit_by;

    /**
     * 一对一关联
     */
    @TableField(exist = false)
    private TUser ownerDO = new TUser();
    @TableField(exist = false)
    private TActivity activityDO = new TActivity();
    @TableField(exist = false)
    private TDicValue appellationDO = new TDicValue();
    @TableField(exist = false)
    private TDicValue needLoanDO = new TDicValue();
    @TableField(exist = false)
    private TDicValue intentionStateDO = new TDicValue();
    @TableField(exist = false)
    private TProduct intentionProductDO = new TProduct();
    @TableField(exist = false)
    private TDicValue stateDO = new TDicValue();
    @TableField(exist = false)
    private TDicValue sourceDO = new TDicValue();
}